package com.loong.web.gp4j.service.attach;

import com.loong.web.gp4j.bean.schema.attach.AttachSchema;
import com.loong.web.gp4j.bean.vo.util.CodeVo;

/**
 * 附件封装器
 *
 * @author 张成轩
 */
public class AttachAdapter {

	/**
	 * @param sign
	 * @param original
	 * @param md
	 * @param sm
	 * @param schema
	 */
	public static void convert(String sign, String original, String md, String sm, AttachSchema schema) {

		schema.setSign(sign);
		schema.setOriginal(original);
		schema.setMd(md);
		schema.setSm(sm);
	}

	/**
	 * @param schema
	 * @param vo
	 */
	public static void convert(AttachSchema schema, CodeVo vo) {

		vo.id(schema.getId()).key(schema.getSign());
	}
}
